<!DOCTYPE HTML>
<html>
<head>
<title>cinema</title>
<link href="css/bootstrap.css" rel="stylesheet" type="text/css"
	media="all">
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="application/x-javascript">
	
			addEventListener("load", function() {
				setTimeout(hideURLbar, 0);
			}, false);

			function hideURLbar() {
				window.scrollTo(0, 1);
			}
		
</script>

<script src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/easing.js"></script>
<link rel="stylesheet" href="css/flexslider.css" type="text/css"
	media="screen" />
<link href="css/megamenu.css" rel="stylesheet" type="text/css"
	media="all" />
<script type="text/javascript" src="js/megamenu.js"></script>
<script>
	$(document).ready(function() {
		$(".megamenu").megamenu();
	});
</script>
<script src="js/menu_jquery.js"></script>
<link rel="stylesheet" href="css/etalage.css">
<script src="js/jquery.easydropdown.js"></script>
<script src="js/jquery.etalage.min.js"></script>
<script>
	jQuery(document)
			.ready(
					function($) {

						$('#etalage')
								.etalage(
										{
											thumb_image_width : 300,
											thumb_image_height : 400,
											source_image_width : 900,
											source_image_height : 1200,
											show_hint : true,
											click_callback : function(
													image_anchor, instance_id) {
												alert('Callback example:\nYou clicked on an image with the anchor: "'
														+ image_anchor
														+ '"\n(in Etalage instance: "'
														+ instance_id + '")');
											}
										});

					});
</script>

<script type="text/javascript" src="js/jquery.jscrollpane.min.js"></script>
<script type="text/javascript" id="sourcecode">
	$(function() {
		$('.scroll-pane').jScrollPane();
	});
</script>

<script type="text/javascript">
	$(function() {
		var mid = getParam();
		showAllCinema(mid);
		getUser();
	});
	function getUser() {
		$.ajax({
			url:"user/getUser",
			type:"get",
			success:function(data){
				if(data!=""){
					$("#userLogin").css("display","none");
					$("#userMessage").css("display","block");
					var content = '<a href="info.html">'
						+'<img alt="" src="'+data.uimg+'" height="40px" style="border-radius: 50%;">&nbsp'
						+'<span style="color:black;" id="uname">'+data.uname+'</span>&nbsp&nbsp'
						+'</a>'
						+'<button type="button" class="btn btn-info" onclick="logout()" style="">注销</button>';
					$("#userMessage").html(content);
				}else{
					$("#userLogin").css("display","block");
					$("#userMessage").css("display","none");
				}
			}
		});
	}
	function logout(){
		$.ajax({
			url:"user/logout",
			type:"get",
			success:function(data){
				getUser();
			}
		});
	}
	function getParam() {
		var url = location.search; //获取url中"?"符后的字串
		if (url.indexOf("?") != -1) {
			var str = url.substr(1);
			strs = str.split("&");
			var mid = decodeURIComponent(strs[0].replace("mid=", ""));
			return mid;
		}
	}
	function showAllCinema(mid) {
		$.ajax({
			url : "cinema/showAllCinema",
			type : "get",
			success : function(data) {
				var content = "";
				for (var i = 0; i < data.length; i++) {
					content += '<div class="brand_box">'
							+ '<div class="left-side col-xs-12 col-sm-3">'
							+ '<img src="'+data[i].yimg+'" alt="" />'
							+ '</div>'
							+ '<div class="middle-side col-xs-12 col-sm-5">'
							+ '<h4><a href="choice.html?mid='+mid+'&yid='+data[i].yid+'">'
							+ data[i].yname + '</a></h4>' + '<p>'
							+ data[i].yaddress + '</p>' + '<p>电话：'
							+ data[i].yphone + '</p>' + '<p>服务：'
							+ data[i].ytext + '</p>' + '</div>'
							+ '<div class="right-side col-xs-12 col-sm-4">'
							+ '<a class="products" href="choice.html?mid='+mid+'&yid='+data[i].yid+'">选座购票</a>'
							+ '</div>' + '<div class="clearfix"> </div>'
							+ '</div>';
				}
				$("#total").html(data.length);
				$("#allCinema").html(content);
			}
		});
	}
</script>
</head>
<body>
	<!-- header -->
	<div style="height: 100px;">
		<div style="position: fixed;width: 100%;z-index: 999;">
		<div class="header">
			<div class="top_bg" style="background-color: white;">
				<div class="container">
					<div class="header_top">
						<div class="logo">
							<a href="index.html"><img src="images/logo.png" alt="" />蜗牛影院</a>
						</div>
						<div class="top_right" style="margin-top: 0">
							<div id="userMessage" style="line-height: 45px;display: none;">
								<!-- <a href="info.html"><img alt="" src="images/aimg.jpg" height="40px" style="border-radius: 50%;" id="uimg">&nbsp<span style="color:black;" id="uname">1823342352323</span></a> -->
							</div>
							<ul id="userLogin" style="line-height: 45px;display: none;">
								<li><a href="registration.html"><button type="button" class="btn btn-info">注册</button></a></li>|
								<li class="login">
									<div id="loginContainer"><a href="#" id="loginButton"><button type="button" class="btn btn-info">登陆</button></a>
										<div id="loginBox">
											<form id="loginForm">
												<fieldset id="body">
													<fieldset>
														<label for="email">账号</label>
														<input type="text" name="email" id="email">
													</fieldset>
													<fieldset>
														<label for="password">密码</label>
														<input type="password" name="password" id="password">
													</fieldset>
													<input type="submit" id="login" value="登陆">
													<label for="checkbox"><input type="checkbox" id="checkbox"> <i>记住我</i></label>
												</fieldset>
												<span><a href="#">密码忘记了?</a></span>
											</form>
										</div>
									</div>
								</li>
							</ul>
						</div>
						<div class="clearfix"> </div>
					</div>
				</div>
			</div>
		</div>
		<div class="head-bann">
			<div class="container">
				<div class="head-nav">
					<span class="menu"> </span>
					<ul class="megamenu skyblue">
						<li><a class="color1" href="index.html">首页</a></li>
						<li class="grid"><a class="color2" href="movies.html">影片</a></li>
						<li><a class="color4" href="cinema.html?mid=1">影院</a></li>
						<li><a class="color5" href="comment.html">评论</a></li>
						<div class="clearfix"> </div>
					</ul>
				</div>
			</div>
		</div>
		</div>
		</div>
	<!-- script-for-nav -->
	<script>
		$("span.menu").click(function() {
			$(".head-nav ul").slideToggle(300, function() {
				// Animation complete.
			});
		});
	</script>
	<!-- script-for-nav -->

	<div class="banner1">
		<div class="container"></div>
	</div>
	<!-- header -->
	<div class="men">
		<div class="container">
			<div class="col-md-9 single_top">
				<h1 class="page-heading product-listing">影院列表</h1>
				<div class="product-count">
					共有<span id="total">0</span>家影院
				</div>
				<div id="allCinema"></div>
				<!--<div class="brand_box">
						<div class="left-side col-xs-12 col-sm-3">
							<img src="images/2nd-day.jpg" alt="" />
						</div>
						<div class="middle-side col-xs-12 col-sm-5">
							<h4><a href="#">影院名</a></h4>
							<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet
								dolore magna aliquam erat volutpat. Ut wisi enim</p>
						</div>
						<div class="right-side col-xs-12 col-sm-4">
							<a class="products" href="#">选座购票</a>
						</div>
						<div class="clearfix"> </div>
					</div>
					<div class="brand_box">
						<div class="left-side col-xs-12 col-sm-3">
							<img src="images/weekday1.jpg" alt="" />
						</div>
						<div class="middle-side col-xs-12 col-sm-5">
							<h4><a href="#">Lorem Ipsum</a></h4>
							<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet
								dolore magna aliquam erat volutpat. Ut wisi enim</p>
						</div>
						<div class="right-side col-xs-12 col-sm-4">
							<a class="products" href="#">选座购票</a>
						</div>
						<div class="clearfix"> </div>
					</div>
					<div class="brand_box">
						<div class="left-side col-xs-12 col-sm-3">
							<img src="images/g-star-raw.jpg" alt="" />
						</div>
						<div class="middle-side col-xs-12 col-sm-5">
							<h4><a href="#">Lorem Ipsum</a></h4>
							<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet
								dolore magna aliquam erat volutpat. Ut wisi enim</p>
						</div>
						<div class="right-side col-xs-12 col-sm-4">
							<a class="products" href="#">选座购票</a>
						</div>
						<div class="clearfix"> </div>
					</div>
					<div class="brand_box">
						<div class="left-side col-xs-12 col-sm-3">
							<img src="images/weekday1.jpg" alt="" />
						</div>
						<div class="middle-side col-xs-12 col-sm-5">
							<h4><a href="#">Lorem Ipsum</a></h4>
							<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet
								dolore magna aliquam erat volutpat. Ut wisi enim</p>
						</div>
						<div class="right-side col-xs-12 col-sm-4">
							<a class="products" href="#">选座购票</a>
						</div>
						<div class="clearfix"> </div>
					</div> -->
			</div>
			<div class="col-md-3 brand-left">
				<h3 class="m_1">影片预告</h3>
				<ul class="product">
					<li class="product_img"><img src="images/pdz.jpg"
						class="img-responsive" alt="" /></li>
					<li class="product_desc">
						<h4>
							<a href="#">攀登者</a>
						</h4>
						<p class="single_price">剧情,冒险</p>
						<p class="single_price">2019-09-30大陆上映</p> <a href="#"
						class="link-cart">预约订票</a>
					</li>
					<div class="clearfix"></div>
				</ul>
				<ul class="product">
					<li class="product_img"><img src="images/pdz.jpg"
						class="img-responsive" alt="" /></li>
					<li class="product_desc">
						<h4>
							<a href="#">攀登者</a>
						</h4>
						<p class="single_price">剧情,冒险</p>
						<p class="single_price">2019-09-30大陆上映</p> <a href="#"
						class="link-cart">预约订票</a>
					</li>
					<div class="clearfix"></div>
				</ul>
				<ul class="product">
					<li class="product_img"><img src="images/pdz.jpg"
						class="img-responsive" alt="" /></li>
					<li class="product_desc">
						<h4>
							<a href="#">攀登者</a>
						</h4>
						<p class="single_price">剧情,冒险</p>
						<p class="single_price">2019-09-30大陆上映</p> <a href="#"
						class="link-cart">预约订票</a>
					</li>
					<div class="clearfix"></div>
				</ul>
				<ul class="product">
					<li class="product_img"><img src="images/pdz.jpg"
						class="img-responsive" alt="" /></li>
					<li class="product_desc">
						<h4>
							<a href="#">攀登者</a>
						</h4>
						<p class="single_price">剧情,冒险</p>
						<p class="single_price">2019-09-30大陆上映</p> <a href="#"
						class="link-cart">预约订票</a>
					</li>
					<div class="clearfix"></div>
				</ul>
			</div>
			<div class="clearfix"></div>
		</div>
	</div>
	<!-- footer -->
	<div class="footer">
		<div class="container">
			<p>Copyright &copy; 2015.Company name All rights reserved.</p>
		</div>
	</div>
	<!-- footer -->

</body>
</html>
